#include <alibabacloud/oss/OssClient.h>
#include <string>
using namespace AlibabaCloud::OSS;
using std::string;
struct OSSinfo{
    string EndPoint = "oss-cn-wuhan-lr.aliyuncs.com";
    string AccessKeyID = "LTAI5t6MyCDuFo6KFzYbW3dx";
    string AccessKeySecret = "3gPyzAC9nnLeyUuxaRPMpJxVT7v13j";
    string Bucket = "60niqiu-test";
};
int main(){
    InitializeSdk();
    OSSinfo info;
    ClientConfiguration conf;
    OssClient client(info.EndPoint,info.AccessKeyID,info.AccessKeySecret,conf);
    auto outcome = client.PutObject(info.Bucket,"newdir/2.txt","1.txt");
    if(outcome.isSuccess()){
        std::cout << "put object success!\n";
    }
    else{
        std::cerr << "put object fail! message = " << outcome.error().Message() << "\n";
    }
    ShutdownSdk();
    return 0;
}
